<?php if (!empty($top_menu["banner_url"])) : ?>
    <img src="<?= $top_menu["banner_url"]?>" style="width:100%;margin-bottom: 10px;margin-top: -10px">
<?php endif; ?>
<div class="row">
    <div class="col-md-3">
        <?php if (!empty($children_menu)) : ?>
            <div class="panel panel-default">
                <div class="panel-heading"><h3 class="panel-title"><?= $top_menu["menu_name"] ?></h3></div>
                <div class="list-group">
                    <?php foreach ($children_menu as $child_menu) { ?>
                        <a href="/home/menu?s=<?= $child_menu["menu_name"] ?>"
                           class="list-group-item <?= ($this->params['left_meun_active_id'] == $child_menu["objectId"]) ? 'active' : '' ?>"><?= $child_menu["menu_name"] ?></a>
                    <?php } ?>
                </div>
            </div>
        <?php endif; ?>
        <div class="panel panel-default">
            <div class="panel-heading"><h3 class="panel-title">最新动态</h3></div>
            <div class="list-group">
                <?php foreach ($newest_content as $content) { ?>
                    <a target="_blank" href="/home/content?id=<?= $content["objectId"] ?>"
                       class="list-group-item"><?= $content["title"] ?></a>
                <?php } ?>
            </div>
        </div>
    </div>
    <div class="col-md-9">
        <?php if ($right_content_from_menu["menu_type"] == 2) : ?>
            <div class="panel panel-default">
                <div class="panel-heading"><h3 class="panel-title"><?=$right_content_from_menu["menu_name"]?></h3></div>
                <div class="panel-body">
                    <div class="text-center" style="margin-top: -20px">
                        <h3><?= current($right_content_list["content_list"])["title"] ?></h3>
                    </div>
                    <div class="text-right">
                        <?= current($right_content_list["content_list"])["createdBy"] ?>
                        <?= date_format(date_create(current($right_content_list["content_list"])["createdAt"]), 'Y-m-d') ?>
                    </div>
                    <div>
                        <?= current($right_content_list["content_list"])["detail"] ?>
                    </div>
                </div>
            </div>
        <?php else: ?>
            <div class="panel panel-default">
                <div class="panel-heading"><h3 class="panel-title"><?=$right_content_from_menu["menu_name"]?></h3></div>
                <div class="panel-body">
                    <?php if ($right_content_from_menu["menu_type"] == 0) : ?>
                        <?php foreach ($right_content_list["content_list"] as $content) { ?>
                            <div class="news-item">
                                <span style="float: right;"><?= date_format(date_create($content["createdAt"]), 'Y-m-d') ?></span>
                                <a target="_blank" href="/home/content?id=<?= $content["objectId"] ?>"><?= $content["title"] ?></a>
                            </div>
                        <?php } ?>
                    <?php else: ?>
                        <div class="row">
                            <?php foreach ($right_content_list["content_list"] as $content) { ?>
                                <div class="col-sm-6 col-md-4">
                                    <div class="thumbnail">
                                        <a href="/home/content?id=<?= $content["objectId"] ?>">
                                            <img  src='<?= empty($content["image_url"]) ? "/images/default.png" : $content["image_url"] ?>'/>
                                        </a>
                                        <div class="caption">
                                            <a target="_blank" href="/home/content?id=<?= $content["objectId"] ?>"><?= $content["title"] ?></a>
                                        </div>
                                    </div>
                                </div>
                            <?php } ?>
                        </div>
                    <?php endif; ?>
                    <div><?= $right_content_list["page_html"] ?></div>
                </div>
            </div>
        <?php endif; ?>
    </div>
</div>